﻿Public Class PlayerStatus

    Private StatusXml As XDocument
    Public Sub New(ByVal statusXml As XDocument)
        Me.StatusXml = statusXml
        If statusXml.<getplayerstatus>.<error>.Value IsNot Nothing Then
            _hasError = True
        End If
    End Sub

    Private _hasError As Boolean
    Public ReadOnly Property HasError() As Boolean
        Get
            Return _hasError
        End Get
    End Property

    Public ReadOnly Property Status() As String
        Get
            Return StatusXml.<getplayerstatus>.@status
        End Get
    End Property

    Public ReadOnly Property ErrorCode() As String
        Get
            Return StatusXml.<getplayerstatus>.<error>.<code>.Value
        End Get
    End Property


End Class
